from .power_on import handle_power_on
from .power_off import handle_power_off
from .next import handle_next
from .previous import handle_previous

def handle_cmd(cmd, message, gui, log_func):
    if cmd == 'POWER_ON':
        return handle_power_on(message, gui, log_func)
    elif cmd == 'POWER_OFF':
        return handle_power_off(message, gui, log_func)
    elif cmd == 'NEXT':
        return handle_next(message, gui, log_func)
    elif cmd == 'PREVIOUS':
        return handle_previous(message, gui, log_func)
    return {
        "error": "Unsupported command",
        "cmd": cmd
    }